home *** CD-ROM | disk | FTP | other *** search
- #include <pm/pm.h>
-
- main ()
- {
- StdApp *application = [[StdApp alloc] init];
- MainWindow *mainwindow = [[MainWindow alloc]
- initWithId: 1000
- andFlags: (FCF_SIZEBORDER | FCF_TASKLIST |
- FCF_SHELLPOSITION | FCF_TITLEBAR |
- FCF_MINMAX | FCF_SYSMENU)];
- Container *container;
-
- [mainwindow createObjects];
-
- [mainwindow makeKeyAndOrderFront: nil];
-
- container = [[Container alloc] initWithId: 1001
- andFlags: (CCS_MINIRECORDCORE |
- WS_VISIBLE)
- in: mainwindow];
- [mainwindow insertChild: container];
- [container setSize: 0:0:[mainwindow width]:[mainwindow height]];
-
- [container insertObject: [[Object alloc] init]]; // first object
-
- [container insertObject: [[Object alloc] init]
- withTitle: "Title of object"]; // second object
-
- [container insertObject: [[Object alloc] init]
- withTitle: "Another object"
- andIcon: WinQuerySysPointer (HWND_DESKTOP,
- SPTR_APPICON,
- FALSE)]; // third object
- [container arrange];
-
- [application run];
-
- [mainwindow free];
- [application free];
- }
-